<?php 

require_once('../include/GeneralTop.php');
require('../include/class/db.php');
require('../include/class/pagination.php');
require('../include/simpleHeader.php');

$id  = "-1";
if (isset($_GET['Id'])) {
  $id  = $_GET['Id'];
}

$db = new db;
$sql = sprintf("SELECT * FROM happyhome WHERE Id = %s", GetSQLValueString($id, "int"));
$res = $db->query($sql);
$row = $db->fetch($res);

?>

<body topmargin="0" leftmargin="0">
<table width="777" border="0" align="left" cellpadding="0" cellspacing="0" valign="top">
  <tr>
    <td width="777" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="51" valign="top" background="../images/fen_09.gif"><table width="95%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="16">&nbsp;</td>
            </tr>
          </table>
          <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td width="14"><img src="../images/fen_12.gif" width="7" height="29"></td>
              <td width="405"><span class="font_16px_black_B"><?php echo TEXT_LOST_INFO?></span></td>
              <td width="15">&nbsp;</td>
              <td width="299" align="right" class="font_12px_gray"><a href="javascript:history.go(-1);" class="gray_12px">[<?php echo TEXT_BACK?>]</a></td>
              </tr>
          </table></td>
        </tr>
      </table>
      <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="1" bgcolor="#767676"></td>
        </tr>
      </table>
      <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="8"></td>
        </tr>
      </table>
      <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td valign="top" class="font_12px_gray"><table width="735" border="0" align="center" cellpadding="0" cellspacing="0" class="font_12px_gray">
            <tr>
              <td width="60"><div align="left"><strong><?php echo TEXT_TITLE?>: </strong></div></td>
              <td width="600" align="left"><?php echo $row['haphome_title']; ?></td>
              <!--<td width="60"><div align="left"><strong><?php echo TEXT_BOOK_AUTHOR?>: </strong></div></td>
              <td width="560"><?php echo $row['haphome_author']; ?></td>-->
            </tr>
            <tr><td>&nbsp;</td></tr>
            <tr>
              <td colspan="2"><p><STRONG><?php echo TEXT_INTRO?>: </STRONG></p>
                <p><?php echo $row['haphome_info']; ?></p>
                <p>
                <?php
                if('' != $row['haphome_pic'] && NULL != $row['haphome_pic']) {
                ?>
                <img class="img_border" src="<?php echo IMAGES_HAPPYHOME_FOLDER.$row['haphome_pic']; ?>" border="0" class="img_border">
                <?php
                }
                ?>
                <?php
                if('' != $row['haphome_pic2'] && NULL != $row['haphome_pic2']) {
                ?>
                &nbsp;&nbsp;<img class="img_border" src="<?php echo IMAGES_HAPPYHOME_FOLDER.$row['haphome_pic2']; ?>" border="0" class="img_border">
                <?php
                }
                ?>
                <?php
                if('' != $row['haphome_pic3'] && NULL != $row['haphome_pic3']) {
                ?>
                &nbsp;&nbsp;<img class="img_border" src="<?php echo IMAGES_HAPPYHOME_FOLDER.$row['haphome_pic3']; ?>" border="0" class="img_border">
                <?php
                }
                ?>
                <br>              
                    <br>
                  </p></td>
              </tr>
            <tr>
			  <td align="left">
			   	<input type="button" id="button" name="button" value="<?php echo TEXT_BACK?>" onclick="javascript:history.go(-1);"/>
			  </td>
			  <td>&nbsp;</td>   
			  </tr>
          </table>
          <p>&nbsp;</p></td>
        </tr>
      </table>
      <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="8"></td>
        </tr>
      </table></td>
  </tr>
</table>
</body>
</html>